#include <iostream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

using namespace std;

class ClientSock {
    int Sock;
    sockaddr_in SockAddress;
    string IPAddress;
    int Port;
    string SendMessage;
    string ReceiveMessage;

    char* StringToCharArray(string str);
    string CharArrayToString(char* arr, int len);

public:
    ClientSock();

    void SetIPAddress(string str);
    void SetPort(int Port);
    void SetSocket();
    void SetSendMessage(string SendMessage);
    bool Send();
    bool Receive();

    string showReceiveMessage();
};